package com.example.qxfw.sjjk.controller;

import com.example.qxfw.common.SysResult;
import com.example.qxfw.sjjk.entity.dto.DataMonitoringDto;
import com.example.qxfw.sjjk.entity.vo.DataMonitoringVo;
import com.example.qxfw.sjjk.service.DataMonitoringScervice;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 数据监控
 */
@RestController
@RequestMapping("DataMonitory")
@RequiredArgsConstructor
public class DataMonitoringController {

    private final DataMonitoringScervice dataMonitoringScervice;

    /**
     * 获取数据监控
     * @param
     * @return
     */
    @RequestMapping("/getDataMonitoring")
    public SysResult getDataMonitoring(String monitoradvcode){
        return SysResult.success(dataMonitoringScervice.getDataMonitoring(monitoradvcode));
    }

    /**
     * 更新数据监控
     * @param
     * @return
     */
    @RequestMapping("/updateDataMonitoring")
    public SysResult updateDataMonitoring(@RequestBody DataMonitoringDto dataMonitoringDto){
        dataMonitoringScervice.updateDataMonitoring(dataMonitoringDto);
        return SysResult.success();
    }



}
